<?php
declare (strict_types = 1);

namespace app\admin\controller;

class Category extends AdminBase
{
    protected function initialize()
    {
        parent::initialize();
        $this->model = new \app\common\model\Category;
        $this->validate = new \app\common\validate\Category;
        $this->order = 'cid desc';
    }
    // 生成数结构数据
    public function tree(){
        $res = $this->model->getTreeData();
        return json($res);
    }
}
